package com.hunttown.mes.rpc.domain;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * created by wangjunfu on 2022-03-30 15:25:51
 */
public class MesEquipmentRepairDTO implements Serializable {
    private Integer id;
    private Integer entId;
    private Integer equipId;
    private Integer failureId;
    private String failureDescription;
    private Integer isAffectProduction;
    private Integer reportId;
    private Date reportTime;
    private Integer repairId;
    private Date repairTime;
    private Date completeTime;
    private String repairResult;
    private String repairDescription;
    private Integer status;
    private String remark;
    private Integer adminId;
    private Date createTime;
    private Integer stopFlag;
    private Integer deleteFlag;

    private String equipName;
    private String failureName;
    private String reportCn;
    private String reportTimeSr;
    private String repairCn;
    private String repairTimeSr;
    private String completeTimeSr;
    private String statusName;

    //以下内容由Alt+Ins快捷生成

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getEntId() {
        return entId;
    }

    public void setEntId(Integer entId) {
        this.entId = entId;
    }

    public Integer getEquipId() {
        return equipId;
    }

    public void setEquipId(Integer equipId) {
        this.equipId = equipId;
    }

    public Integer getFailureId() {
        return failureId;
    }

    public void setFailureId(Integer failureId) {
        this.failureId = failureId;
    }

    public String getFailureDescription() {
        return failureDescription;
    }

    public void setFailureDescription(String failureDescription) {
        this.failureDescription = failureDescription;
    }

    public Integer getIsAffectProduction() {
        return isAffectProduction;
    }

    public void setIsAffectProduction(Integer isAffectProduction) {
        this.isAffectProduction = isAffectProduction;
    }

    public Integer getReportId() {
        return reportId;
    }

    public void setReportId(Integer reportId) {
        this.reportId = reportId;
    }

    public Date getReportTime() {
        return reportTime;
    }

    public void setReportTime(Date reportTime) {
        this.reportTime = reportTime;
    }

    public Integer getRepairId() {
        return repairId;
    }

    public void setRepairId(Integer repairId) {
        this.repairId = repairId;
    }

    public Date getRepairTime() {
        return repairTime;
    }

    public void setRepairTime(Date repairTime) {
        this.repairTime = repairTime;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public String getRepairResult() {
        return repairResult;
    }

    public void setRepairResult(String repairResult) {
        this.repairResult = repairResult;
    }

    public String getRepairDescription() {
        return repairDescription;
    }

    public void setRepairDescription(String repairDescription) {
        this.repairDescription = repairDescription;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStopFlag() {
        return stopFlag;
    }

    public void setStopFlag(Integer stopFlag) {
        this.stopFlag = stopFlag;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getEquipName() {
        return equipName;
    }

    public void setEquipName(String equipName) {
        this.equipName = equipName;
    }

    public String getFailureName() {
        return failureName;
    }

    public void setFailureName(String failureName) {
        this.failureName = failureName;
    }

    public String getReportCn() {
        return reportCn;
    }

    public void setReportCn(String reportCn) {
        this.reportCn = reportCn;
    }

    public String getReportTimeSr() {
        if (reportTimeSr == null || reportTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

            if (reportTime == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(reportTime.getTime()));
            }
        } else {
            return reportTimeSr;
        }
    }

    public void setReportTimeSr(String reportTimeSr) {
        this.reportTimeSr = reportTimeSr;
    }

    public String getRepairCn() {
        return repairCn;
    }

    public void setRepairCn(String repairCn) {
        this.repairCn = repairCn;
    }

    public String getRepairTimeSr() {
        if (repairTimeSr == null || repairTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

            if (repairTime == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(repairTime.getTime()));
            }
        } else {
            return repairTimeSr;
        }
    }

    public void setRepairTimeSr(String repairTimeSr) {
        this.repairTimeSr = repairTimeSr;
    }

    public String getCompleteTimeSr() {
        if (completeTimeSr == null || completeTimeSr.equals("")) {
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

            if (completeTime == null) {
                return "1990-01-01";
            } else {
                return df.format(new Date(completeTime.getTime()));
            }
        } else {
            return completeTimeSr;
        }
    }

    public void setCompleteTimeSr(String completeTimeSr) {
        this.completeTimeSr = completeTimeSr;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
}